<template>
  <div class="student-list">
    <h2>学生列表2</h2>
    <ul>
      <li v-for="student in students" :key="student.id">
        {{ student.name }} - {{ student.grade }}
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'StudentList2',
  data() {
    return {
      students: [
        { id: 4, name: '赵六', grade: '四年级' },
        { id: 5, name: '钱七', grade: '五年级' },
        { id: 6, name: '孙八', grade: '六年级' }
      ]
    }
  }
}
</script>

<style scoped>
.student-list {
  padding: 20px;
}
.student-list h2 {
  color: #42b983;
}
.student-list ul {
  list-style: none;
  padding: 0;
}
.student-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
</style>